package com.dongdong.zhuangji.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

/**
 * @author dongdong 抖音号：W13883155245
 * @version 1.0
 * @date 2025/6/8
 * @description
 */
@RestController
@RequestMapping("/auth")
public class AuthUser {
    @PostMapping("login-success")
    public String loginSuccess() {
        return "登录成功";
    }
    @GetMapping("login-out")
    public String loginOut() {
        return "退出成功";
    }

    @GetMapping("/r1")
    @PreAuthorize("hasAnyAuthority('superadmin')")
    public String r1(){
        return "r1";
    }
    @GetMapping("/r2")
    @PreAuthorize("hasAnyAuthority('superadmin')")
    public String r2(){
        return "r2";
    }
}
